using System;
using System.Collections.Generic;

namespace JSC.Portal.Utils
{
	/// <summary>
	/// A container class for a RSS feed (for generation purposes).
	/// </summary>
	public class RssChannel
	{
		/// <summary>
		/// Property Title (string)
		/// </summary>
		public string Title
		{
            get;
            set;
        }

		/// <summary>
		/// Property Link (string)
		/// </summary>
		public string Link
		{
            get;
            set;
        }

		/// <summary>
		/// Property Description (string)
		/// </summary>
		public string Description
		{
            get;
            set;
        }

		/// <summary>
		/// Property Language (string)
		/// </summary>
		public string Language
		{
            get;
            set;
        }

		/// <summary>
		/// Property PubDate (DateTime)
		/// </summary>
		public DateTime PubDate
		{
            get;
            set;
        }

		/// <summary>
		/// Property LastBuildDate (DateTime)
		/// </summary>
		public DateTime LastBuildDate
		{
            get;
            set;
        }

		/// <summary>
		/// Property Generator (string)
		/// </summary>
		public string Generator
		{
            get;
            set;
        }

		/// <summary>
		/// Property Ttl (int)
		/// </summary>
		public int Ttl
		{
            get;
            set;
        }

		/// <summary>
		/// Property RssItems (IList)
		/// </summary>
		public IList<RssItem> RssItems
		{
            get;
            set;
        }

		/// <summary>
		/// Default constructor.
		/// </summary>
		public RssChannel()
		{
			// Set some defaults.
			Generator = "JSC Portal";
			Ttl = 60;
			RssItems = new List<RssItem>();
		}
	}

	/// <summary>
	/// A RSS feed item.
	/// </summary>
	public class RssItem
	{
		/// <summary>
		/// Property ItemId (int)
		/// </summary>
		public int ItemId
		{
            get;
            set;
        }

		/// <summary>
		/// Property Title (string)
		/// </summary>
		public string Title
		{
            get;
            set;
        }

		/// <summary>
		/// Property Link (string)
		/// </summary>
		public string Link
		{
            get;
            set;
        }

		/// <summary>
		/// Property Description (string)
		/// </summary>
		public string Description
		{
            get;
            set;
        }

		/// <summary>
		/// Property Author (string)
		/// </summary>
		public string Author
		{
            get;
            set;
        }

		/// <summary>
		/// Property Category (string)
		/// </summary>
		public string Category
		{
            get;
            set;
		}

		/// <summary>
		/// Property PubDate (DateTime)
		/// </summary>
        public DateTime PubDate
        {
            get;
            set;
        }

		/// <summary>
		/// Default constructor.
		/// </summary>
		public RssItem()
		{
			ItemId = -1;
		}
	}
}
